/*
 * Copyright (c) 2025 EasyAdmin
 * All rights reserved.
 *
 * This file is part of the [EasAdmin] project.
 * Unauthorized copying of this file, via any medium, is strictly prohibited.
 * Proprietary and confidential.
 *
 * Author: EasyAdmin ( 1073602@qq.com )
 * Website: https://www.xhxiao.com
 */
package com.easy.module.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easy.module.system.entity.SysDept;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 部门表 Mapper接口
 *
 * @author EasyAdmin ( 1073602@qq.com )
 * @date 2025-08-19
 */
public interface SysDeptMapper extends BaseMapper<SysDept>
{
    /**
     * 修改子元素关系
     *
     * @param deptList 子元素
     * @return 结果
     */
    int updateDeptChildren(@Param("deptList") List<SysDept> deptList);

    /**
     * 修改子部门所属机构编号
     * @param oldOrgId
     * @param newOrgId
     * @param ancestors
     * @return
     */
    int updateDeptChildrenOrgId(@Param("oldOrgId") Long oldOrgId,@Param("newOrgId") Long newOrgId,@Param("ancestors") Long ancestors);


}
